package org.openmore.consumer.service.feignImpl;

import feign.hystrix.FallbackFactory;
import org.openmore.consumer.dto.common.BaseResponse;
import org.openmore.consumer.service.feign.OperatorLogService;
import org.openmore.consumer.dto.common.OperateLogDto;
import org.springframework.stereotype.Component;
import java.util.Date;

@Component
public class OperatorLogServiceImpl extends BaseFeignFallback implements FallbackFactory<OperatorLogService> {
    @Override
    public OperatorLogService create(Throwable cause) {
        return new OperatorLogService() {
            @Override
            public BaseResponse selectAllByPage(String name, Date startTime, Date endTime, Integer pageNum, Integer pageSize) {
                return getFallBackResponse();
            }

            @Override
            public BaseResponse searchOperate(String staffName, Date startTime, Date endTime, Integer pageNum, Integer pageSize) {
                return getFallBackResponse();
            }

            @Override
            public BaseResponse getOperateLogById(String id) {
                return getFallBackResponse();
            }

            @Override
            public BaseResponse insertLog(OperateLogDto operateLogDto) {
                return getFallBackResponse();
            }
        };
    }
}
